import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:geomancy/enums/index.dart';
import 'package:geomancy/styles/index.dart';
import 'package:geomancy/tools/constant.dart';
import 'package:geomancy/widgets/common_header.dart';
import 'package:geomancy/widgets/common_text.dart';
import 'package:geomancy/widgets/common_title.dart';

class RelationsResultDetailPage extends StatefulWidget {
  final CompassSource source;
  final double direction;
  final int index;///具体某个宫位的index
  const RelationsResultDetailPage({super.key, required this.source, required this.direction, required this.index});

  @override
  State<RelationsResultDetailPage> createState() => _WealthResultDetailPageState();
}

class _WealthResultDetailPageState extends State<RelationsResultDetailPage> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CommonHeader.appBar(context: context),
      backgroundColor: ColorStyle.pageDefaultColor,
      body: ListView(
        physics: const ClampingScrollPhysics(),
        padding: EdgeInsets.fromLTRB(Constant.PAGEPADDING.w, 20.w, Constant.PAGEPADDING.w, 80.w),
        children: [
          const CommonTitleWidget(txt: '本命桃花位'),
          Container(
            margin: EdgeInsets.only(top: 20.w),
            padding: EdgeInsets.fromLTRB(40.w, 30.w, 40.w, 30.w),
            alignment: Alignment.center,
            decoration: BoxDecoration(
                color: ColorStyle.themeLightColor,
                border: Border.all(width: 5.w, color: ColorStyle.borderColor),
                borderRadius: BorderRadius.all(Radius.circular(60.w))
            ),
            child: const Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                CommonText(txt: '催动桃花位的方法：', height: 1.5),
                CommonText(txt: '1.可在桃花位放置开花的（不带刺）植物盆栽，不可放置凋零的植物。', height: 1.5),
                CommonText(txt: '2.若放置花瓶，宜在瓶中装满清水，再插上鲜花。', height: 1.5),
                CommonText(txt: '桃花位宜保持干净、整洁、明亮。不可放置杂物、镜子、空瓶子、电器用品、刀剑。', height: 1.5),
              ],
            )
          ),
          Container(
            margin: EdgeInsets.symmetric(vertical: 40.w),
            child: Image.asset('assets/grid/grid_relations_compass_${widget.index}.png', width: 670.w),
          ),
        ],
      ),
    );
  }
}
